<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class TestController extends Controller
{
    public function index(){

    	$url = "http://www.larapi.test/api/products/9";

        $ch = curl_init();

        curl_setopt($ch, CURLOPT_URL, $url);

        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); 

        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); 

        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

        $output = curl_exec($ch);

        curl_close($ch);

        $output = json_decode($output,true);

    	dd($output);

    }
}
